Integrand size = 25, antiderivative size = 301 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {1}{16} \left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right ) x-\frac {a \left (4 a^4 C-32 b^4 (5 A+4 C)-a^2 b^2 (190 A+121 C)\right ) \sin (c+d x)}{60 b d}-\frac {\left (8 a^4 C-15 b^4 (6 A+5 C)-2 a^2 b^2 (130 A+89 C)\right ) \cos (c+d x) \sin (c+d x)}{240 d}+\frac {a \left (70 A b^2-4 a^2 C+53 b^2 C\right ) (a+b \cos (c+d x))^2 \sin (c+d x)}{120 b d}-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) (a+b \cos (c+d x))^3 \sin (c+d x)}{120 b d}-\frac {a C (a+b \cos (c+d x))^4 \sin (c+d x)}{30 b d}+\frac {C (a+b \cos (c+d x))^5 \sin (c+d x)}{6 b d} \]
1/16*(8*a^4*(2*A+C)+12*a^2*b^2*(4*A+3*C)+b^4*(6*A+5*C))*x-1/60*a*(4*a^4*C- 32*b^4*(5*A+4*C)-a^2*b^2*(190*A+121*C))*sin(d*x+c)/b/d-1/240*(8*a^4*C-15*b ^4*(6*A+5*C)-2*a^2*b^2*(130*A+89*C))*cos(d*x+c)*sin(d*x+c)/d+1/120*a*(70*A *b^2-4*C*a^2+53*C*b^2)*(a+b*cos(d*x+c))^2*sin(d*x+c)/b/d-1/120*(4*a^2*C-5* b^2*(6*A+5*C))*(a+b*cos(d*x+c))^3*sin(d*x+c)/b/d-1/30*a*C*(a+b*cos(d*x+c)) ^4*sin(d*x+c)/b/d+1/6*C*(a+b*cos(d*x+c))^5*sin(d*x+c)/b/d
Time = 2.05 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.00 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {960 a^4 A c+2880 a^2 A b^2 c+360 A b^4 c+480 a^4 c C+2160 a^2 b^2 c C+300 b^4 c C+960 a^4 A d x+2880 a^2 A b^2 d x+360 A b^4 d x+480 a^4 C d x+2160 a^2 b^2 C d x+300 b^4 C d x+480 a b \left (b^2 (6 A+5 C)+a^2 (8 A+6 C)\right ) \sin (c+d x)+15 \left (16 a^4 C+96 a^2 b^2 (A+C)+b^4 (16 A+15 C)\right ) \sin (2 (c+d x))+320 a A b^3 \sin (3 (c+d x))+320 a^3 b C \sin (3 (c+d x))+400 a b^3 C \sin (3 (c+d x))+30 A b^4 \sin (4 (c+d x))+180 a^2 b^2 C \sin (4 (c+d x))+45 b^4 C \sin (4 (c+d x))+48 a b^3 C \sin (5 (c+d x))+5 b^4 C \sin (6 (c+d x))}{960 d} \]
(960*a^4*A*c + 2880*a^2*A*b^2*c + 360*A*b^4*c + 480*a^4*c*C + 2160*a^2*b^2 *c*C + 300*b^4*c*C + 960*a^4*A*d*x + 2880*a^2*A*b^2*d*x + 360*A*b^4*d*x + 480*a^4*C*d*x + 2160*a^2*b^2*C*d*x + 300*b^4*C*d*x + 480*a*b*(b^2*(6*A + 5 *C) + a^2*(8*A + 6*C))*Sin[c + d*x] + 15*(16*a^4*C + 96*a^2*b^2*(A + C) + b^4*(16*A + 15*C))*Sin[2*(c + d*x)] + 320*a*A*b^3*Sin[3*(c + d*x)] + 320*a ^3*b*C*Sin[3*(c + d*x)] + 400*a*b^3*C*Sin[3*(c + d*x)] + 30*A*b^4*Sin[4*(c + d*x)] + 180*a^2*b^2*C*Sin[4*(c + d*x)] + 45*b^4*C*Sin[4*(c + d*x)] + 48 *a*b^3*C*Sin[5*(c + d*x)] + 5*b^4*C*Sin[6*(c + d*x)])/(960*d)
Time = 1.09 (sec) , antiderivative size = 312, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3503, 3042, 3232, 3042, 3232, 27, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^4 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3503 |
\(\displaystyle \frac {\int (a+b \cos (c+d x))^4 (b (6 A+5 C)-a C \cos (c+d x))dx}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^4 \left (b (6 A+5 C)-a C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \int (a+b \cos (c+d x))^3 \left (3 a b (10 A+7 C)-\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \cos (c+d x)\right )dx-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (3 a b (10 A+7 C)+\left (5 b^2 (6 A+5 C)-4 a^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {1}{4} \int 3 (a+b \cos (c+d x))^2 \left (b \left (8 (5 A+3 C) a^2+5 b^2 (6 A+5 C)\right )+a \left (-4 C a^2+70 A b^2+53 b^2 C\right ) \cos (c+d x)\right )dx-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int (a+b \cos (c+d x))^2 \left (b \left (8 (5 A+3 C) a^2+5 b^2 (6 A+5 C)\right )+a \left (-4 C a^2+70 A b^2+53 b^2 C\right ) \cos (c+d x)\right )dx-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (b \left (8 (5 A+3 C) a^2+5 b^2 (6 A+5 C)\right )+a \left (-4 C a^2+70 A b^2+53 b^2 C\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int (a+b \cos (c+d x)) \left (a b \left (8 (15 A+8 C) a^2+b^2 (230 A+181 C)\right )-\left (8 C a^4-2 b^2 (130 A+89 C) a^2-15 b^4 (6 A+5 C)\right ) \cos (c+d x)\right )dx+\frac {a \left (-4 a^2 C+70 A b^2+53 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a b \left (8 (15 A+8 C) a^2+b^2 (230 A+181 C)\right )+\left (-8 C a^4+2 b^2 (130 A+89 C) a^2+15 b^4 (6 A+5 C)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {a \left (-4 a^2 C+70 A b^2+53 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\right )-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {a \left (-4 a^2 C+70 A b^2+53 b^2 C\right ) \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}+\frac {1}{3} \left (-\frac {2 a \left (4 a^4 C-a^2 b^2 (190 A+121 C)-32 b^4 (5 A+4 C)\right ) \sin (c+d x)}{d}-\frac {b \left (8 a^4 C-2 a^2 b^2 (130 A+89 C)-15 b^4 (6 A+5 C)\right ) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {15}{2} b x \left (8 a^4 (2 A+C)+12 a^2 b^2 (4 A+3 C)+b^4 (6 A+5 C)\right )\right )\right )-\frac {\left (4 a^2 C-5 b^2 (6 A+5 C)\right ) \sin (c+d x) (a+b \cos (c+d x))^3}{4 d}\right )-\frac {a C \sin (c+d x) (a+b \cos (c+d x))^4}{5 d}}{6 b}+\frac {C \sin (c+d x) (a+b \cos (c+d x))^5}{6 b d}\) |
(C*(a + b*Cos[c + d*x])^5*Sin[c + d*x])/(6*b*d) + (-1/5*(a*C*(a + b*Cos[c + d*x])^4*Sin[c + d*x])/d + (-1/4*((4*a^2*C - 5*b^2*(6*A + 5*C))*(a + b*Co s[c + d*x])^3*Sin[c + d*x])/d + (3*((a*(70*A*b^2 - 4*a^2*C + 53*b^2*C)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + ((15*b*(8*a^4*(2*A + C) + 12*a^2 *b^2*(4*A + 3*C) + b^4*(6*A + 5*C))*x)/2 - (2*a*(4*a^4*C - 32*b^4*(5*A + 4 *C) - a^2*b^2*(190*A + 121*C))*Sin[c + d*x])/d - (b*(8*a^4*C - 15*b^4*(6*A + 5*C) - 2*a^2*b^2*(130*A + 89*C))*Cos[c + d*x]*Sin[c + d*x])/(2*d))/3))/ 4)/5)/(6*b)
3.6.50.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^ (m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^ m*Simp[A*b*(m + 2) + b*C*(m + 1) - a*C*Sin[e + f*x], x], x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && !LtQ[m, -1]
Time = 6.88 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.68
method | result | size |
parallelrisch | \(\frac {\left (\left (240 A +225 C \right ) b^{4}+1440 a^{2} b^{2} \left (A +C \right )+240 C \,a^{4}\right ) \sin \left (2 d x +2 c \right )+320 b \left (\left (A +\frac {5 C}{4}\right ) b^{2}+a^{2} C \right ) a \sin \left (3 d x +3 c \right )+30 \left (b^{2} \left (A +\frac {3 C}{2}\right )+6 a^{2} C \right ) b^{2} \sin \left (4 d x +4 c \right )+48 C a \,b^{3} \sin \left (5 d x +5 c \right )+5 C \,b^{4} \sin \left (6 d x +6 c \right )+3840 \left (\left (\frac {3 A}{4}+\frac {5 C}{8}\right ) b^{2}+a^{2} \left (A +\frac {3 C}{4}\right )\right ) b a \sin \left (d x +c \right )+960 x \left (\left (\frac {3 A}{8}+\frac {5 C}{16}\right ) b^{4}+3 \left (A +\frac {3 C}{4}\right ) a^{2} b^{2}+a^{4} \left (A +\frac {C}{2}\right )\right ) d}{960 d}\) | \(204\) |
parts | \(a^{4} x A +\frac {\left (A \,b^{4}+6 C \,a^{2} b^{2}\right ) \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d}+\frac {\left (4 A a \,b^{3}+4 C \,a^{3} b \right ) \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}+\frac {\left (6 A \,a^{2} b^{2}+C \,a^{4}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {C \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}+\frac {4 \sin \left (d x +c \right ) A \,a^{3} b}{d}+\frac {4 C a \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5 d}\) | \(240\) |
derivativedivides | \(\frac {C \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {4 C a \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+A \,b^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+6 C \,a^{2} b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 A a \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {4 C \,a^{3} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+6 A \,a^{2} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 A \sin \left (d x +c \right ) a^{3} b +a^{4} A \left (d x +c \right )}{d}\) | \(294\) |
default | \(\frac {C \,b^{4} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {4 C a \,b^{3} \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+A \,b^{4} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+6 C \,a^{2} b^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 A a \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {4 C \,a^{3} b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+6 A \,a^{2} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{4} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 A \sin \left (d x +c \right ) a^{3} b +a^{4} A \left (d x +c \right )}{d}\) | \(294\) |
risch | \(a^{4} x A +3 x A \,a^{2} b^{2}+\frac {3 x A \,b^{4}}{8}+\frac {a^{4} C x}{2}+\frac {9 x C \,a^{2} b^{2}}{4}+\frac {5 b^{4} C x}{16}+\frac {4 \sin \left (d x +c \right ) A \,a^{3} b}{d}+\frac {3 \sin \left (d x +c \right ) A a \,b^{3}}{d}+\frac {3 \sin \left (d x +c \right ) C \,a^{3} b}{d}+\frac {5 \sin \left (d x +c \right ) C a \,b^{3}}{2 d}+\frac {C \,b^{4} \sin \left (6 d x +6 c \right )}{192 d}+\frac {C a \,b^{3} \sin \left (5 d x +5 c \right )}{20 d}+\frac {\sin \left (4 d x +4 c \right ) A \,b^{4}}{32 d}+\frac {3 \sin \left (4 d x +4 c \right ) C \,a^{2} b^{2}}{16 d}+\frac {3 \sin \left (4 d x +4 c \right ) C \,b^{4}}{64 d}+\frac {\sin \left (3 d x +3 c \right ) A a \,b^{3}}{3 d}+\frac {\sin \left (3 d x +3 c \right ) C \,a^{3} b}{3 d}+\frac {5 \sin \left (3 d x +3 c \right ) C a \,b^{3}}{12 d}+\frac {3 \sin \left (2 d x +2 c \right ) A \,a^{2} b^{2}}{2 d}+\frac {\sin \left (2 d x +2 c \right ) A \,b^{4}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) C \,a^{4}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) C \,a^{2} b^{2}}{2 d}+\frac {15 \sin \left (2 d x +2 c \right ) C \,b^{4}}{64 d}\) | \(360\) |
norman | \(\frac {\left (a^{4} A +3 A \,a^{2} b^{2}+\frac {3}{8} A \,b^{4}+\frac {1}{2} C \,a^{4}+\frac {9}{4} C \,a^{2} b^{2}+\frac {5}{16} C \,b^{4}\right ) x +\left (a^{4} A +3 A \,a^{2} b^{2}+\frac {3}{8} A \,b^{4}+\frac {1}{2} C \,a^{4}+\frac {9}{4} C \,a^{2} b^{2}+\frac {5}{16} C \,b^{4}\right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6 a^{4} A +18 A \,a^{2} b^{2}+\frac {9}{4} A \,b^{4}+3 C \,a^{4}+\frac {27}{2} C \,a^{2} b^{2}+\frac {15}{8} C \,b^{4}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6 a^{4} A +18 A \,a^{2} b^{2}+\frac {9}{4} A \,b^{4}+3 C \,a^{4}+\frac {27}{2} C \,a^{2} b^{2}+\frac {15}{8} C \,b^{4}\right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (15 a^{4} A +45 A \,a^{2} b^{2}+\frac {45}{8} A \,b^{4}+\frac {15}{2} C \,a^{4}+\frac {135}{4} C \,a^{2} b^{2}+\frac {75}{16} C \,b^{4}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (15 a^{4} A +45 A \,a^{2} b^{2}+\frac {45}{8} A \,b^{4}+\frac {15}{2} C \,a^{4}+\frac {135}{4} C \,a^{2} b^{2}+\frac {75}{16} C \,b^{4}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (20 a^{4} A +60 A \,a^{2} b^{2}+\frac {15}{2} A \,b^{4}+10 C \,a^{4}+45 C \,a^{2} b^{2}+\frac {25}{4} C \,b^{4}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {\left (64 A \,a^{3} b -48 A \,a^{2} b^{2}+64 A a \,b^{3}-10 A \,b^{4}-8 C \,a^{4}+64 C \,a^{3} b -60 C \,a^{2} b^{2}+64 C a \,b^{3}-11 C \,b^{4}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {\left (64 A \,a^{3} b +48 A \,a^{2} b^{2}+64 A a \,b^{3}+10 A \,b^{4}+8 C \,a^{4}+64 C \,a^{3} b +60 C \,a^{2} b^{2}+64 C a \,b^{3}+11 C \,b^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {\left (960 A \,a^{3} b -432 A \,a^{2} b^{2}+704 A a \,b^{3}-42 A \,b^{4}-72 C \,a^{4}+704 C \,a^{3} b -252 C \,a^{2} b^{2}+448 C a \,b^{3}+5 C \,b^{4}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (960 A \,a^{3} b +432 A \,a^{2} b^{2}+704 A a \,b^{3}+42 A \,b^{4}+72 C \,a^{4}+704 C \,a^{3} b +252 C \,a^{2} b^{2}+448 C a \,b^{3}-5 C \,b^{4}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (1600 A \,a^{3} b -240 A \,a^{2} b^{2}+960 A a \,b^{3}-10 A \,b^{4}-40 C \,a^{4}+960 C \,a^{3} b -60 C \,a^{2} b^{2}+832 C a \,b^{3}-75 C \,b^{4}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}+\frac {\left (1600 A \,a^{3} b +240 A \,a^{2} b^{2}+960 A a \,b^{3}+10 A \,b^{4}+40 C \,a^{4}+960 C \,a^{3} b +60 C \,a^{2} b^{2}+832 C a \,b^{3}+75 C \,b^{4}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6}}\) | \(881\) |
1/960*(((240*A+225*C)*b^4+1440*a^2*b^2*(A+C)+240*C*a^4)*sin(2*d*x+2*c)+320 *b*((A+5/4*C)*b^2+a^2*C)*a*sin(3*d*x+3*c)+30*(b^2*(A+3/2*C)+6*a^2*C)*b^2*s in(4*d*x+4*c)+48*C*a*b^3*sin(5*d*x+5*c)+5*C*b^4*sin(6*d*x+6*c)+3840*((3/4* A+5/8*C)*b^2+a^2*(A+3/4*C))*b*a*sin(d*x+c)+960*x*((3/8*A+5/16*C)*b^4+3*(A+ 3/4*C)*a^2*b^2+a^4*(A+1/2*C))*d)/d
Time = 0.31 (sec) , antiderivative size = 212, normalized size of antiderivative = 0.70 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {15 \, {\left (8 \, {\left (2 \, A + C\right )} a^{4} + 12 \, {\left (4 \, A + 3 \, C\right )} a^{2} b^{2} + {\left (6 \, A + 5 \, C\right )} b^{4}\right )} d x + {\left (40 \, C b^{4} \cos \left (d x + c\right )^{5} + 192 \, C a b^{3} \cos \left (d x + c\right )^{4} + 320 \, {\left (3 \, A + 2 \, C\right )} a^{3} b + 128 \, {\left (5 \, A + 4 \, C\right )} a b^{3} + 10 \, {\left (36 \, C a^{2} b^{2} + {\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{3} + 64 \, {\left (5 \, C a^{3} b + {\left (5 \, A + 4 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )^{2} + 15 \, {\left (8 \, C a^{4} + 12 \, {\left (4 \, A + 3 \, C\right )} a^{2} b^{2} + {\left (6 \, A + 5 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \]
1/240*(15*(8*(2*A + C)*a^4 + 12*(4*A + 3*C)*a^2*b^2 + (6*A + 5*C)*b^4)*d*x + (40*C*b^4*cos(d*x + c)^5 + 192*C*a*b^3*cos(d*x + c)^4 + 320*(3*A + 2*C) *a^3*b + 128*(5*A + 4*C)*a*b^3 + 10*(36*C*a^2*b^2 + (6*A + 5*C)*b^4)*cos(d *x + c)^3 + 64*(5*C*a^3*b + (5*A + 4*C)*a*b^3)*cos(d*x + c)^2 + 15*(8*C*a^ 4 + 12*(4*A + 3*C)*a^2*b^2 + (6*A + 5*C)*b^4)*cos(d*x + c))*sin(d*x + c))/ d
Leaf count of result is larger than twice the leaf count of optimal. 748 vs. \(2 (274) = 548\).
Time = 0.41 (sec) , antiderivative size = 748, normalized size of antiderivative = 2.49 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\begin {cases} A a^{4} x + \frac {4 A a^{3} b \sin {\left (c + d x \right )}}{d} + 3 A a^{2} b^{2} x \sin ^{2}{\left (c + d x \right )} + 3 A a^{2} b^{2} x \cos ^{2}{\left (c + d x \right )} + \frac {3 A a^{2} b^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{d} + \frac {8 A a b^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {4 A a b^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {3 A b^{4} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 A b^{4} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 A b^{4} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 A b^{4} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 A b^{4} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {C a^{4} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{4} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {C a^{4} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} + \frac {8 C a^{3} b \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {4 C a^{3} b \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac {9 C a^{2} b^{2} x \sin ^{4}{\left (c + d x \right )}}{4} + \frac {9 C a^{2} b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{2} + \frac {9 C a^{2} b^{2} x \cos ^{4}{\left (c + d x \right )}}{4} + \frac {9 C a^{2} b^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{4 d} + \frac {15 C a^{2} b^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{4 d} + \frac {32 C a b^{3} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {16 C a b^{3} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac {4 C a b^{3} \sin {\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {5 C b^{4} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {15 C b^{4} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {15 C b^{4} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {5 C b^{4} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {5 C b^{4} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {5 C b^{4} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} + \frac {11 C b^{4} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (A + C \cos ^{2}{\left (c \right )}\right ) \left (a + b \cos {\left (c \right )}\right )^{4} & \text {otherwise} \end {cases} \]
Piecewise((A*a**4*x + 4*A*a**3*b*sin(c + d*x)/d + 3*A*a**2*b**2*x*sin(c + d*x)**2 + 3*A*a**2*b**2*x*cos(c + d*x)**2 + 3*A*a**2*b**2*sin(c + d*x)*cos (c + d*x)/d + 8*A*a*b**3*sin(c + d*x)**3/(3*d) + 4*A*a*b**3*sin(c + d*x)*c os(c + d*x)**2/d + 3*A*b**4*x*sin(c + d*x)**4/8 + 3*A*b**4*x*sin(c + d*x)* *2*cos(c + d*x)**2/4 + 3*A*b**4*x*cos(c + d*x)**4/8 + 3*A*b**4*sin(c + d*x )**3*cos(c + d*x)/(8*d) + 5*A*b**4*sin(c + d*x)*cos(c + d*x)**3/(8*d) + C* a**4*x*sin(c + d*x)**2/2 + C*a**4*x*cos(c + d*x)**2/2 + C*a**4*sin(c + d*x )*cos(c + d*x)/(2*d) + 8*C*a**3*b*sin(c + d*x)**3/(3*d) + 4*C*a**3*b*sin(c + d*x)*cos(c + d*x)**2/d + 9*C*a**2*b**2*x*sin(c + d*x)**4/4 + 9*C*a**2*b **2*x*sin(c + d*x)**2*cos(c + d*x)**2/2 + 9*C*a**2*b**2*x*cos(c + d*x)**4/ 4 + 9*C*a**2*b**2*sin(c + d*x)**3*cos(c + d*x)/(4*d) + 15*C*a**2*b**2*sin( c + d*x)*cos(c + d*x)**3/(4*d) + 32*C*a*b**3*sin(c + d*x)**5/(15*d) + 16*C *a*b**3*sin(c + d*x)**3*cos(c + d*x)**2/(3*d) + 4*C*a*b**3*sin(c + d*x)*co s(c + d*x)**4/d + 5*C*b**4*x*sin(c + d*x)**6/16 + 15*C*b**4*x*sin(c + d*x) **4*cos(c + d*x)**2/16 + 15*C*b**4*x*sin(c + d*x)**2*cos(c + d*x)**4/16 + 5*C*b**4*x*cos(c + d*x)**6/16 + 5*C*b**4*sin(c + d*x)**5*cos(c + d*x)/(16* d) + 5*C*b**4*sin(c + d*x)**3*cos(c + d*x)**3/(6*d) + 11*C*b**4*sin(c + d* x)*cos(c + d*x)**5/(16*d), Ne(d, 0)), (x*(A + C*cos(c)**2)*(a + b*cos(c))* *4, True))
Time = 0.22 (sec) , antiderivative size = 283, normalized size of antiderivative = 0.94 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {960 \, {\left (d x + c\right )} A a^{4} + 240 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{4} - 1280 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{3} b + 1440 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} b^{2} + 180 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} b^{2} - 1280 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a b^{3} + 256 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} C a b^{3} + 30 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{4} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} C b^{4} + 3840 \, A a^{3} b \sin \left (d x + c\right )}{960 \, d} \]
1/960*(960*(d*x + c)*A*a^4 + 240*(2*d*x + 2*c + sin(2*d*x + 2*c))*C*a^4 - 1280*(sin(d*x + c)^3 - 3*sin(d*x + c))*C*a^3*b + 1440*(2*d*x + 2*c + sin(2 *d*x + 2*c))*A*a^2*b^2 + 180*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d *x + 2*c))*C*a^2*b^2 - 1280*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a*b^3 + 25 6*(3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*C*a*b^3 + 30*(1 2*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*A*b^4 - 5*(4*sin(2*d *x + 2*c)^3 - 60*d*x - 60*c - 9*sin(4*d*x + 4*c) - 48*sin(2*d*x + 2*c))*C* b^4 + 3840*A*a^3*b*sin(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 247, normalized size of antiderivative = 0.82 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {C b^{4} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {C a b^{3} \sin \left (5 \, d x + 5 \, c\right )}{20 \, d} + \frac {1}{16} \, {\left (16 \, A a^{4} + 8 \, C a^{4} + 48 \, A a^{2} b^{2} + 36 \, C a^{2} b^{2} + 6 \, A b^{4} + 5 \, C b^{4}\right )} x + \frac {{\left (12 \, C a^{2} b^{2} + 2 \, A b^{4} + 3 \, C b^{4}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (4 \, C a^{3} b + 4 \, A a b^{3} + 5 \, C a b^{3}\right )} \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} + \frac {{\left (16 \, C a^{4} + 96 \, A a^{2} b^{2} + 96 \, C a^{2} b^{2} + 16 \, A b^{4} + 15 \, C b^{4}\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} + \frac {{\left (8 \, A a^{3} b + 6 \, C a^{3} b + 6 \, A a b^{3} + 5 \, C a b^{3}\right )} \sin \left (d x + c\right )}{2 \, d} \]
1/192*C*b^4*sin(6*d*x + 6*c)/d + 1/20*C*a*b^3*sin(5*d*x + 5*c)/d + 1/16*(1 6*A*a^4 + 8*C*a^4 + 48*A*a^2*b^2 + 36*C*a^2*b^2 + 6*A*b^4 + 5*C*b^4)*x + 1 /64*(12*C*a^2*b^2 + 2*A*b^4 + 3*C*b^4)*sin(4*d*x + 4*c)/d + 1/12*(4*C*a^3* b + 4*A*a*b^3 + 5*C*a*b^3)*sin(3*d*x + 3*c)/d + 1/64*(16*C*a^4 + 96*A*a^2* b^2 + 96*C*a^2*b^2 + 16*A*b^4 + 15*C*b^4)*sin(2*d*x + 2*c)/d + 1/2*(8*A*a^ 3*b + 6*C*a^3*b + 6*A*a*b^3 + 5*C*a*b^3)*sin(d*x + c)/d
Time = 2.32 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.19 \[ \int (a+b \cos (c+d x))^4 \left (A+C \cos ^2(c+d x)\right ) \, dx=A\,a^4\,x+\frac {3\,A\,b^4\,x}{8}+\frac {C\,a^4\,x}{2}+\frac {5\,C\,b^4\,x}{16}+3\,A\,a^2\,b^2\,x+\frac {9\,C\,a^2\,b^2\,x}{4}+\frac {A\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {A\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {C\,a^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {15\,C\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{64\,d}+\frac {3\,C\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{64\,d}+\frac {C\,b^4\,\sin \left (6\,c+6\,d\,x\right )}{192\,d}+\frac {A\,a\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {5\,C\,a\,b^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {C\,a^3\,b\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {C\,a\,b^3\,\sin \left (5\,c+5\,d\,x\right )}{20\,d}+\frac {3\,A\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {3\,C\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {3\,C\,a^2\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{16\,d}+\frac {3\,A\,a\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {4\,A\,a^3\,b\,\sin \left (c+d\,x\right )}{d}+\frac {5\,C\,a\,b^3\,\sin \left (c+d\,x\right )}{2\,d}+\frac {3\,C\,a^3\,b\,\sin \left (c+d\,x\right )}{d} \]
A*a^4*x + (3*A*b^4*x)/8 + (C*a^4*x)/2 + (5*C*b^4*x)/16 + 3*A*a^2*b^2*x + ( 9*C*a^2*b^2*x)/4 + (A*b^4*sin(2*c + 2*d*x))/(4*d) + (A*b^4*sin(4*c + 4*d*x ))/(32*d) + (C*a^4*sin(2*c + 2*d*x))/(4*d) + (15*C*b^4*sin(2*c + 2*d*x))/( 64*d) + (3*C*b^4*sin(4*c + 4*d*x))/(64*d) + (C*b^4*sin(6*c + 6*d*x))/(192* d) + (A*a*b^3*sin(3*c + 3*d*x))/(3*d) + (5*C*a*b^3*sin(3*c + 3*d*x))/(12*d ) + (C*a^3*b*sin(3*c + 3*d*x))/(3*d) + (C*a*b^3*sin(5*c + 5*d*x))/(20*d) + (3*A*a^2*b^2*sin(2*c + 2*d*x))/(2*d) + (3*C*a^2*b^2*sin(2*c + 2*d*x))/(2* d) + (3*C*a^2*b^2*sin(4*c + 4*d*x))/(16*d) + (3*A*a*b^3*sin(c + d*x))/d + (4*A*a^3*b*sin(c + d*x))/d + (5*C*a*b^3*sin(c + d*x))/(2*d) + (3*C*a^3*b*s in(c + d*x))/d